<template>
	<view class="content">
		<view class="list">


			<block v-for="(item,index) in txLog" :key="index">
				<view class="item">
					<view class="left-view">


						<view class="cen-view">
							<view style="align-items: center; display: flex;">
								<image src="../../static/finance/iv_xiao_fei_ji_lu.png" id="img-icon">
								</image>
								<text id="tv-status">{{item.status_name}}</text>
							</view>

							<text id="tv-time">审核时间 &nbsp;&nbsp; {{item.updated_at}}</text>
						</view>



					</view>
					<text id="tv-money">{{item.money}}</text>
				</view>
				<view class="line" style="margin-left: 30rpx; margin-right: 30rpx;"></view>
			</block>

		</view>
	</view>
</template>

<script>
	import ajax from '@/api/api.js';
	import url from '@/api/url.js';
	export default {
		data() {
			return {
				txLog :[]
			};
		},

		onLoad() {
			this.getTxLog()
		},
		
		onPullDownRefresh() {
			this.getTxLog()
		},

		methods: {

			getTxLog() {
				ajax(url.myWithdrawal, {

				}).then(res => {
					uni.stopPullDownRefresh();
					if (res.data.code != 1) {
						uni.showToast({
							title: res.data.msg
						})
						return;
					}
					this.txLog = res.data.data
					console.log("this.txLog============" + this.txLog)
				}).catch(err => {
					console.log(err)
					uni.stopPullDownRefresh();
				});
			}
		}
	}
</script>

<style lang="scss">
	.content {
		background-color: $app-page-color;
		height: 100vh;
		display: flex;
		flex-direction: column;

		.item {
			background-color: white;
			align-items: center;
			display: flex;
			width: 100vw;

			.left-view {
				width: 90vw;
				margin-left: 30rpx;
				align-items: center;
				display: flex;

				.cen-view {
					margin-top: 20rpx;
					margin-left: 18rpx;
					flex-direction: column;
					display: flex;

					#img-icon {
						width: 34rpx;
						height: 34rpx;

					}

					#tv-status {
						font-weight: bold;
						margin-left: 16rpx;
						font-size: 28rpx;
						color: #333;

					}

					#tv-time {
						margin-top: 6rpx;
					}

				}


			}

			#tv-money {
				margin-right: 32rpx;
				align-items: center;
				text-align: center;
				font-weight: bold;
			}

		}
	}
</style>